package com.sskj.gocoin.mine;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.bean.ShareEntry;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.mine.data.MoneyDetail;
import com.sskj.gocoin.p.base.BasePresenter;

public class MoneyDetailPresenter extends BasePresenter<MoneyDetailActivity> {
    public void getData(int page) {
        OkGo.<HttpData<MoneyDetail>>get(HttpConfig.BASE_URL + HttpConfig.MONEY_DETAIL)
                .params("page", page)
                .execute(new JsonCallBack<HttpData<MoneyDetail>>(this, true) {
                    @Override
                    protected void _onSuccess(Response<HttpData<MoneyDetail>> response) {
                        mView.setData(response.body().getData());
                    }

                    @Override
                    public void onFinish() {
                        super.onFinish();
                        mView.stopRefresh();
                    }
                });
    }
}
